package {{.PackageNameExtend}};
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;{{ range .Imports }}
import {{ . }};{{ end }}

/**
 * @Author {{.Author}}
 * @Date {{.Date}}
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "{{.ClassName}}{{.Suffix}}",description = "{{.TableComment}}")
@TableName("{{.Table}}")
public class {{.ClassName}}{{.Suffix}} implements Serializable {
    private static final long serialVersionUID = 1L;
{{range $index, $element := .Fields}}
    {{with $element.Desc}}
    /**
     * {{$element.Desc}}
     */
    @ApiModelProperty(value = "{{$element.Desc}}", required = {{$element.IsNotNull}}){{else}}
    @ApiModelProperty(value = "没有字段描述", required = {{$element.IsNotNull}}){{end}}{{if and $element.IsAutoIncrement $element.IsPrimaryKey }}
    @TableId(value = "{{$element.Column}}", type = IdType.AUTO){{else if .IsPrimaryKey}}
    @TableId(value = "{{$element.Column}}", type = IdType.NONE){{else}}
    @TableField("{{$element.Column}}"){{end}}
    private {{.Type}} {{$element.Column}};
{{ end }}

}
